package com.itheima.chap04;

public class UserBiz {
    public String login(String username, String password)  {
        if(!isValid(username , password)){
            System.out.println("用户名或密码错误");
            return null;
        }
        System.out.println("登录成功");
        return username;
    }

    private boolean isValid(String username, String password) {
        return username.equals("admin") && password.equals("123");
    }
}
